<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Html5 Input 类型</title>
</head>

<body>
    <script>
        let types = 'color, date, datetime, datetime-local, month, week, time, file, hidden, image, number, range, search, tel, text, password, email, url, select, radio, checkbox, textarea'
        types.split(',').forEach(type => {
            type = type.trim();
            document.write(type + ': <input type="' + type + '" placeholder="' + type + '" /><br />')
        })
    </script>
</body>

</html>